<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
%>

<!--  2010-07-21 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>年级管理</title>
	<link href="<%=path%>/css/index_css.css" rel="stylesheet" type="text/css" />
	<script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
	<script type="text/javascript">
		function tdClick(url)
		{
		  window.location.href=url;
		}
		 window.onload = function(){
	    if('${info}'!="")
	    {
	      alert('${info}');
	    }
        resizeIframe();
      }
      
      

        
         //到年级信息修改页面    2010-7-26
    function toUpdateGrade(gradeId){
    	var rtnValue=window.showModalDialog("<%=path %>/getGradeByGradeIdGradeAndClassAction.action?grade.gradeId="+gradeId+"&t="+new Date(),"","dialogHeight:200px;dialogWidth:360px;help=0;scroll=1;");
      	if(rtnValue=='true')
      	{
        	window.location.href="<%=path %>/getGradeListGradeAndClassAction.action?t="+new Date();
      	}
    }
    

    
 
    
    function updateGradeStatus(gradeId,status){
    	if(confirm("确定要执行此操作吗？")){
    		window.location.href="<%=path%>/updateGradeStatusGradeAndClassAction.action?grade.gradeId="+gradeId+"&grade.status="+status;
    	}
    }
	</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="left" class="f_5">基本设置</td>
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#9DD12E"></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="bottom" background="<%=path %>/images/sywesp_24.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
         
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_25.gif" class="f_9">年级设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
             <td width="70" align="left"><table width="100" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path %>/getGradeListGradeAndClassAction.action?setGraduation=true');" style="cursor:pointer;">毕业年级</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path%>/findGradeAndClassBySchoolGradeAndClassAction.action?year=${applicationScope.currentYear}');"" style="cursor:pointer;">班级设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="90" align="left"><table width="100" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path %>/getAllYearAndSchoolTermyearAndSchoolTermAction.action');" style="cursor:pointer;">年度学期设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path %>/findCourseByParentCourseIdCourseAction.action');" style="cursor:pointer;">学科设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="80" align="left"><table width="80" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path %>/findAllOrganizationByTypeorganizationAction.action?organization.orgType=1');" style="cursor:pointer;">教研组设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="100" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path %>/findAllCodeMaintenanceTypeCodeMaintenanceAction.action');" style="cursor:pointer;">选项配置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
             
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/baseSet/openClose.jsp');" style="cursor:pointer;">开关控制</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
             <td width="75" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="images/sywesp_18.gif" class="f_6" style="cursor:pointer;" nowrap="nowrap" onclick="tdClick('<%=path %>/initMethodGraduationAndUpgradeAction.action');">毕业升级</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" style="cursor:pointer;" nowrap="nowrap" onclick="tdClick('<%=path %>/toClassSectionTimesListClassSectionTimesAction.action');">课时管理</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td align="left">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="tb_8 border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" align="left" bgcolor="#FFFFFF" class="f_8">
			  <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
          <!-- 当前使用年级开始 -->
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="1%" height="30" bgcolor="#DCE8F6">&nbsp;</td>
              <td width="30%" align="left" bgcolor="#DCE8F6" class="f_5">当前使用年级</td>
              <td width="69%" bgcolor="#DCE8F6" class="f_10">&nbsp;</td>
            </tr>
            <tr>
              <td height="1" colspan="3" bgcolor="#FFFFFF"></td>
            </tr>
            <c:if test="${! empty requestScope.gradeList}">
          
            <c:forEach items="${requestScope.gradeList}" var="grade">
            <c:if test="${grade.status==1}">
            <tr>
              <td bgcolor="#F4F8FB">&nbsp;</td>
              <td height="30" colspan="2" align="left" valign="bottom" bgcolor="#F4F8FB" class="f_5">
                ${grade.name}(${stageMap[grade.stageId]})
                <a href="javascript:toUpdateGrade('${grade.gradeId}');" >修改</a>|<a href="javascript:updateGradeStatus('${grade.gradeId}','2');"/>停用</a>
              </td>
            </tr>
            </c:if>
            </c:forEach>
            </c:if>
            <c:if test="${empty requestScope.gradeList}">
              <tr>
                <td colspan="3" align="center"><font color="red" size="+2">暂无信息！</font></td>
              </tr>
            </c:if>
            <tr>
              <td bgcolor="#F4F8FB">&nbsp;</td>
              <td height="20" colspan="2" align="left" valign="bottom" bgcolor="#F4F8FB" class="f_5">&nbsp;</td>
            </tr>
       
          </table>
          <!-- 当前使用年级结束 -->
          
          
          
          <!-- 备用年级 -->
           <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="1%" height="30" bgcolor="#DCE8F6">&nbsp;</td>
              <td width="30%" align="left" bgcolor="#DCE8F6" class="f_5">备用年级</td>
              <td width="69%" bgcolor="#DCE8F6" class="f_10">&nbsp;</td>
            </tr>
            <tr>
              <td height="1" colspan="3" bgcolor="#FFFFFF"></td>
            </tr>
            <c:if test="${! empty requestScope.gradeList}">
            <c:forEach items="${requestScope.gradeList}" var="grade">
            <c:if test="${grade.status==2}">
            <tr>
              <td bgcolor="#F4F8FB">&nbsp;</td>
              <td height="30" colspan="2" align="left" valign="bottom" bgcolor="#F4F8FB" class="f_5">
                ${grade.name}(${stageMap[grade.stageId]})
                <a href="javascript:toUpdateGrade('${grade.gradeId}');" >修改</a>|<a href="javascript:updateGradeStatus('${grade.gradeId}','1');"/>启用</a>
              </td>
            </tr>
            </c:if>
            </c:forEach>
            </c:if>
            <c:if test="${empty requestScope.gradeList}">
              <tr>
                <td colspan="3" align="center"><font color="red" size="+2">暂无信息！</font></td>
              </tr>
            </c:if>
            <tr>
              <td bgcolor="#F4F8FB">&nbsp;</td>
              <td height="20" colspan="2" align="left" valign="bottom" bgcolor="#F4F8FB" class="f_5">&nbsp;</td>
            </tr>
       
          </table>
          <!-- 备用年级结束 -->
         
          </tr>
          <tr>
            <td height="5"></td>
          </tr>
        </table>
			  </td>
              </tr>
            <tr>
              <td height="30" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
                  
              </table></td>
            </tr>
          </table>
          </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
